[SSH -L]端口转发¶
参考:
ssh tunnel refusing connections with “channel 2: open failed”
定义¶
ssh
命令使用参数-L
能够实现端口转发功能,设置如下
$ ssh -L 7788:127.0.0.1:8888 xxx@xxx.xxx.xx
上述命令将本地7788
端口映射到远程服务器8888
端口
使用¶
在远程服务端打开jupyter notebook
:
jupyter notebook --ip 0.0.0.0 --allow-root
在本地就可以通过127.0.0.1:7788?xxxxx
打开